﻿<Window x:Class="List2Code.wndList2Code"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:l="clr-namespace:List2Code"
    Name="Window"
    Title="List 2 Code" Height="604" Width="711" Topmost="True"
        >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Menu>
        </Menu>
        <TabControl Grid.Row="1">
            <TabItem Header="Content">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <ToolBar>
                        <Button ToolTip="Generate Code" Content="Generate" Command="l:wndList2Code.GenerateCode" />
                    </ToolBar>
                    <Label Grid.Row="1" Content="Comma Delimited List."/>
                    <TextBox Name="txtList" Grid.Row="2" TextWrapping="WrapWithOverflow" VerticalScrollBarVisibility="Auto" AutoWordSelection="True"
                             Text="{Binding ContentList, ElementName=Window}"
                            AcceptsReturn="True" />
                    <Grid Grid.Row="3" Height="250">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="200"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" HorizontalAlignment="Right">
                            <Button Content="Duplicate Template" IsEnabled="False" />
                            <Button Content="Save Template" IsEnabled="False" />
                            <Button Content="New Template" IsEnabled="False" />
                        </StackPanel>
                        <Label Grid.Row="1" Grid.Column="1" Content="Code Template"/>
                        <ListBox x:Name="listBox" Grid.Row="2"  Visibility="Hidden"
                                 ItemsSource="{Binding ElementName=Window, Path=TemplateList}" IsSynchronizedWithCurrentItem="True"                                 
								 DisplayMemberPath="Name"                                 
                                 ></ListBox>
                        <TextBox Name="txtTemplate"  Grid.Row="2" Grid.Column="1" TextWrapping="WrapWithOverflow" Text="{Binding TemplateText, ElementName=Window}" ToolTip="Enter Template here."
                                VerticalScrollBarVisibility="Auto" AutoWordSelection="True" AcceptsReturn="True" />
                    </Grid>
                </Grid>
            </TabItem>
            <TabItem Header="Code" x:Name="TabCode">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <ToolBar>
                        <Button Content="Copy"/>
                    </ToolBar>
                    <TextBox Name="txtCode" Grid.Row="1" Text="{Binding Code,ElementName=Window}" 
TextWrapping="WrapWithOverflow" VerticalScrollBarVisibility="Auto" AutoWordSelection="True" AcceptsReturn="True"></TextBox>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
